﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MMSA.Services.Services
{
    public static class DataManagementServiceFactory
    {
        public static IDataManagementService GetDataManagementService(string uploadFileType)
        {
            IDataManagementService dataManagementService;
            switch (uploadFileType)
            {
                case UploadFileTypes.Products:
                    dataManagementService = new ProductManagementService();
                    break;
                case UploadFileTypes.Orders:
                    dataManagementService = new OrderManagementService();
                    break;
                case UploadFileTypes.Costs:
                    dataManagementService = new PricesManagementService();
                    break;
                case UploadFileTypes.AnnualFrequency:
                    dataManagementService = new AnnualFrequencyManagementService();
                    break;
                case UploadFileTypes.MonthlyFrequency:
                    dataManagementService = new MonthlyFrequencyManagementService();
                    break;
                case UploadFileTypes.WeeklyFrequency:
                    dataManagementService = new WeeklyFrequencyManagementService();
                    break;
                case UploadFileTypes.DailyFrequency:
                    dataManagementService = new DailyFrequencyManagementService();
                    break;
                default:
                    dataManagementService = new PlaceManagementService();
                    break;
            }
            return dataManagementService;
        }
    }
}
